<template>
	<view>
		
		<ul class="ul">
			<li v-for="(item,index) in list" :key="index">{{item}}</li>
		</ul>
		<p>{{msg}}</p>
		<button @click="change">更改姓名</button>
		<!-- #ifndef VUE3 -->
		<button>vue2显示</button>
		<!-- #endif -->
		<!-- #ifdef VUE3 -->
		<button>vue3显示</button>
		<!-- #endif -->
	</view>
	
	
</template>

<script>
	// #ifdef VUE3
	import {getCurrentInstance} from 'vue'
	 
	// #endif
	
	export default {
		// #ifdef VUE3
		  setup(){
			   const {proxy} = getCurrentInstance()
			   
		  }
		 
		// #endif
		// #ifndef VUE3
		data() {
			return {
				
			};
		},
		created() {
			console.log(this.$store.state.msg);
			console.log(this.$message);
		},
		computed:{
			msg(){
				return this.$store.state.msg
			},
			list(){
				return this.$store.state.list
			}
		},
		methods:{
			change(){
				this.$store.commit('change')
			}
		}
	}
	// #endif
</script>

<style lang="scss">

</style>
